package com.nav.rummy.core;
import java.util.ArrayList;
import java.util.List;

public class Card implements IArrangement {

	private Rank rank;
	private Suit suit;

	public Card(Rank rank, Suit suit) {
		this.rank = rank;
		this.suit = suit;
	}

	public Rank getRank() {
		return rank;
	}

	public Suit getSuit() {
		return suit;
	}

	public String toString() {
		return "" + rank.toChar() + suit.toChar();
	}

	public static List<Card> newPack() {
		List<Card> pack = new ArrayList<Card>();
		for (Suit suit : Suit.values())
			for (Rank rank : Rank.values())
				pack.add(new Card(rank, suit));
		return pack;
	}
}
